<form id="pagerForm" action="${url}" method="post">
	<input type="hidden" name="curPage" value="${curPage}" />
	<input type="hidden" name="pageSize" value="${pageSize}" />
 	<div class="page clearfloat"> 
  		<div class="<%if(curPage <= 1){%>page-first<%}else{%>page-left<%}%>"><s></s>
  			<%if(curPage <= 1){%><span>上一页</span>
  			<%}else{%>
  			<span><a href="<%if(curPage==2){%>${url}<%}else{%>${url}${curPage-1}<%}%>">上一页</a></span>
  			<%}%>
  		</div> 
  		<ul class="page-midul">
  			<%
 				var startNum = curPage;
  				var endNum = curPage+navNum-1;
 				if(countpages<=navNum){
 					navNum=countpages;
 					startNum=1;
 					endNum = countpages;
 				}else if(countpages-curPage<navNum){
 					startNum = startNum-(navNum-(countpages-curPage))+1;
 					endNum = countpages;
 				}
  			%>
  			<%for(var i=startNum;i<=endNum;i++){%>
  				<%if(curPage==i){%>
  					<li class="select"><span>${i}</span></li>
				<%}else{%><li><a href="${url}<%if(i>1){%>${i}<%}%>">${i}</a></li><%}%>
  			<%}%>
  		</ul> 
		<div class="<%if(curPage>=countpages){%>page-last<%}else{%>page-rig<%}%>">
		   	<span><%if(curPage>=countpages){%>下一页<%}else{%><a href="${url}${curPage+1}">下一页</a><%}%></span>
		   	<s></s>
		</div> 
	  	<div class="page-wz">
	   		共 ${countpages} 页 到第
	  	</div> 
	  	<div class="page-inp">
	   		<input id="toPage" type="text" class="page-inpa" value="${curPage}" onkeyup="value=value.replace(/[^0-9]+/g,'${curPage}');if(value>${countpages}){value=${countpages};}">
	  	</div> 
	  	<div class="page-wz1">页</div> 
	  	<a class="page-submit" href="javascript:pageSubmit();" title="确定"></a> 
	</div> 
</form>
<script type="text/javascript">
	$(function(){
		$(".page-midul").find("li").bind("click",function(){
			reload($(this).find("a").attr("href"));
		});
		$(".page-left").bind("click",function(){
			reload($(this).find("a").attr("href"));
		});
		$(".page-rig").bind("click",function(){
			reload($(this).find("a").attr("href"));
		});
	});
	function reload(href){
		if(href && href.indexOf('javascript') == -1 && href.indexOf('click') == -1){
			location.href = href;
		}
	}
	function pageSubmit(){
		location.href = $("#pagerForm").attr("action")+$("#toPage").val();
	}
</script>